﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EMC;

using DatabaseModule;

using System.IO;
using System.Reflection;

namespace EMCTestSuite
{
    class Program
    {
        static void Main(string[] args)
        {
            //Retrieves the application's directory, from <http://www.csharp-examples.net/get-application-directory/>
            string dbConfigFile = Path.GetDirectoryName(Assembly.GetAssembly(typeof(Program)).CodeBase) + @"/db_settings.xml";
            databaseConfiguration config = new databaseConfiguration(dbConfigFile);

            /*
            FriendManagement friendman = new FriendManagement(config);
            List<string> users = friendman.ListFriends("bob");
            foreach (string user in users)
            {
                Console.WriteLine(user);
            }

            */
            //Test the UserManagement class
           /*
            UserManagement userman = new UserManagement(config);
            userman.adduser("dave", "david", "mogel", "pass");
            Console.WriteLine(userman.userExists("dave"));
            Console.WriteLine(userman.GetUserPassword("dave"));
            Console.WriteLine(userman.authenticateUser("dave",userman.GetUserPassword("dave")));
            //userman.delUser("dave");
            */
            FileManagement fileman = new FileManagement(config);
            fileman.addfile("myfile", "this is a file", "dave");
                       



            Console.ReadKey();
        }
    }
}
